package com.example.user.service.impl;

import java.util.HashMap;
import java.util.Map;

import com.example.user.api.dto.User;
import com.example.user.api.service.UserClient;

/**
 * Project:ms-user-api
 * <p>
 * Title:UserClientImpl.java
 * <p>
 * Description:
 * <p>
 * Copyrigth:Jiang Software LTD.co Copyright (c) 2022
 * <p>
 * 
 * @version 1.0
 * @since 1.8
 * @author jiang
 * @history 2022 jiang create
 */
public class UserClientImpl implements UserClient {

	 private static final Map<Long, User> users = new HashMap<>();
	 
	 static {
	        users.put(10000L, new User(10000L, "张三"));
	        users.put(10001L, new User(10001L, "李四"));
	    }
	 
	@Override
	public User getUserById(long userId) {
		User user = users.get(userId);
		return user;
	}

}
